# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Haelwenn (lanodan) Monnier <contact+alpine@hacktivis.me>
pkgname=lexbor
pkgver=2.3.0
pkgrel=0
pkgdesc="Open source HTML Renderer library"
url="http://lexbor.com"
arch="all"
license="Apache-2.0"
makedepends="cmake samurai"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/lexbor/lexbor/archive/v$pkgver/lexbor-$pkgver.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DLEXBOR_BUILD_TESTS=ON \
		-DLEXBOR_BUILD_SEPARATELY=ON
	cmake --build build
}

check() {
	ctest --output-on-failure --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
add1832f2e1927538206329703cd717fb30cb6ae2f52e1a0042961062cbcafd2e3ce4437ee2081ad7b2d51c6b63b910be06987e47c4a7007321db52b2812e515  lexbor-2.3.0.tar.gz
"
